import request from '@/utils/request'

// 查询产品类型列表
export function listSolution(query) {
  return request({
    url: '/product/solution/list',
    method: 'get',
    params: query
  })
}

// 查询产品类型列表（排除节点）
export function listSolutionExcludeChild(id) {
  return request({
    url: '/product/solution/list/exclude/' + id,
    method: 'get'
  })
}

// 查询产品类型详细
export function getSolution(id) {
  return request({
    url: '/product/solution/' + id,
    method: 'get'
  })
}

// 新增产品类型
export function addSolution(data) {
  return request({
    url: '/product/solution/',
    method: 'post',
    data: data
  })
}

// 修改产品类型
export function updateSolution(data) {
  return request({
    url: '/product/solution/',
    method: 'put',
    data: data
  })
}

// 删除产品类型
export function delSolution(id) {
  return request({
    url: '/product/solution/' + id,
    method: 'delete'
  })
}

export function uploadFileImg(data) {
  return request({
    url: '/product/solution/upload/img',
    method: 'post',
    data: data
  })
}
